package com.example.myproject.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

import com.example.myproject.R;

/**
 * Created by Administrator on 2018/4/1.
 */

public class GifFragment extends Fragment implements View.OnClickListener {

    private ImageView iv_gif_show;
    private Button but_startGif;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_gif, null);

        iv_gif_show = rootView.findViewById(R.id.iv_gif_show);
        but_startGif = rootView.findViewById(R.id.but_startGif);

        but_startGif.setOnClickListener(this);
        return rootView;
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.but_startGif:
                Toast.makeText(getContext(), "开始播放gif图", Toast.LENGTH_LONG).show();
                break;
            default:

                break;
        }
    }
}
